
function PreferenceStringContainer() {
	this.init();
}

PreferenceStringContainer.prototype = {
	init:	function(){
		this.strings = Array();
		this.strings.push("\"><script>alert(1);</script>");
		this.strings.push("abc");
	},

    getStrings:	function(){
        return this.strings;
    },

    addString:	function(preference) {
		if(!preference){
            return false;
        }
        
        if(this.checkUniq(preference)){
            this.strings.push(preference);
            return true;
        }
        else{
            return false;
        }
    },

	removeString:	function(index) {
		this.strings.splice(index,1);
	},

	checkUniq:	function(preference){
		for(var i=0;i<this.strings.length;i++){
			if(this.strings[i] == preference)
				return false;
		}
		return true;
	}
}